<?php 
include_once 'classes/RepModelo.class.php';
include_once 'classes/RepRoda.class.php';
include_once 'classes/RepCor.class.php';
include_once 'classes/RepFreio.class.php';
include_once 'classes/RepMotor.class.php';
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>CADASTRO AUTOMOVEL</title>
	<script language="JavaScript" src="jquery/jquery.js" type="text/javascript"></script>
	<script language="JavaScript" src="jquery/requisicao_combo.js" type="text/javascript"></script>
    <link href="css/estilo.css" rel="stylesheet" type="text/css" media="screen" />

</head>
<body>
<form name="frmAutomovel" id="frmAutomovel" action="automovel.php" method="POST">
<table class="datagrid" align="center">
	<tr class="header">
 		<td colspan="3">CADASTRO AUTOMOVEL</td>
    </tr>
 	<tr>
 		<td colspan="3">&nbsp;</td>
    </tr>
 	<tr class="header">
		<th width="51%" ><strong>MARCA:</strong></th>
		<th width="27%" ><strong>MODELO:</strong></th>
		<th width="22%"><strong>CHASSI:</strong></th>
    </tr>
	<tr>
		<td>
	    	<select name="MARCA" id="MARCA">
	      		<option value="" selected="selected">Escolha uma Marca: </option>
	      		<?php 
				$array_marca = $ObjetoRepModelo->getMarca();
				foreach ($array_marca as $marca){
      				echo "<option value='".$marca."'>".$marca."</option>";			       
				}	
				?>
        	</select>
		</td>
	  	<td>
	    	<select name="MODELO" id="MODELO">
        	</select>
		</td>
	  	<td>
        	<select name="COR_CHASSI" id="COR_CHASSI">
        		<?php
				$array_cor = $ObjetoRepCor->getCor();
				foreach ($array_cor as $cor){
					echo "<option value='".$cor."'>".$cor."</option>";	
				}  
				?>
      		</select>
		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	  	<td>&nbsp;</td>
	  	<td>&nbsp;</td>
    </tr>
	<tr class="header">
		<th><strong>MOTOR:</strong></th>
		<th><strong>POTENCIA:</strong></th>
		<th>&nbsp;</th>
	</tr>
	<tr>
		<td>
        	<select id="MOTOR" name="MOTOR">
          		<option value="" selected="selected">Escolha um Motor:</option>
          	<?php
            	$array_motor = $ObjetoRepMotor->getMotor();
				foreach ($array_motor as $motor){
					echo "<option value='".$motor."'>".$motor."</option>";	
				}  
				?>
        	</select>
		</td>
  		<td>
        	<select id="POTENCIA" name="POTENCIA">
  			</select>
        </td>
		<td>&nbsp;</td>
	</tr>
    <tr>
    	<td>&nbsp;</td>
    	<td>&nbsp;</td>
   		<td>&nbsp;</td>   
	</tr>
    <tr class="header">
		<th><strong>RODA:</strong></th>
      	<th><strong>ARO:</strong></th>
      	<th><strong>COR:</strong></th>
    </tr>
    <tr>
    	<td>
        	<select name="RODA" id="RODA">
        		<option value="" selected="selected">Escolha uma Roda:</option>
          		<?php 
				$array_roda = $ObjetoRepRoda->getTipo();
				foreach ($array_roda as $tipo){
      				echo "<option value='".$tipo."'>".$tipo."</option>";			       
				}	
				?>
        	</select>
		</td>
      	<td>
        	<select name="ARO" id="ARO">
        	</select>
        </td>
      	<td>
        	<select name="COR_RODA" id="COR_RODA">
          		<?php		
				foreach ($array_cor as $cor){
					echo "<option value='".$cor."'>".$cor."</option>";	
				}  
				?>
        	</select>
		</td>
    </tr>
    <tr>
		<td></td>
    	<td>&nbsp;</td>
   		<td>&nbsp;</td> 
    </tr>
	<tr class="header">
		<th><strong>FREIO</strong></th>
     	<th>&nbsp;</th>
		<th>&nbsp;</th>
	</tr>
    <tr>
    	<td>
        	<select name="FREIO" id="FREIO">
          		<option value="" selected="selected">Escolha um Freio:</option>
          		<?php
				$array_freio = $ObjetoRepFreio->getFreio();		
				foreach ($array_freio as $freio){
					echo "<option value='".$freio."'>".$freio."</option>";	
				}  
				?>
        	</select>
		</td>
    	<td>&nbsp;</td>
   		<td>&nbsp;</td>   
	</tr>
<tr>
		<td>&nbsp;</td>
    	<td>&nbsp;</td>
   		<td>&nbsp;</td> 
    </tr>
	<tr>
    	<td>&nbsp;</td>
    	<td>&nbsp;</td>
   		<td><input name="Cadastrar" type="submit" id="Cadastrar" value="Salvar" class="caixa_texto" /></td>   
	</tr>
</table>
<p>&nbsp;</p>
</form>
</body>
</html>